import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeDemo from '@/views/home.vue'
import WaterDemo from '@/views/water.vue'
import VanImageDemo from '@/views/vant/image.vue'
import SignalDemo from '@/views/signal.vue'

Vue.use(VueRouter)

const routes = [
  { name: 'home', path: '/', component: HomeDemo, meta: { title: '首页' } },
  { name: 'water', path: '/water', component: WaterDemo, meta: { title: '水印' } },
  { name: 'van-image', path: '/van-image', component: VanImageDemo, meta: { title: 'vanImage透传组件' } },
  { name: 'signal', path: '/signal', component: SignalDemo, meta: { title: '信号灯' } }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
